package com.quyunshuo.module.home.manager

import android.graphics.drawable.Drawable

data class AppUsage(
    val packageName: String,
    val appName: String,
    val icon: Drawable?,
    val duration: Long, // 毫秒
    val lastTimeUsed: Long // 时间戳
) {
    fun formattedDuration(): String {
        val hours = duration / (1000 * 60 * 60)
        val minutes = (duration % (1000 * 60 * 60)) / (1000 * 60)
        return "${hours}h ${minutes}m"
    }
}